package com.iplant.wms.service.po.mss;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;

import java.io.Serializable;

/**
 * 库存周转规则  套装  先进显出？
 */
@DBBasePO(TableName ="mss_transferrule" ,CheckName = {"Code","BatchRuleID,Name"},
        Schemas = DBSchemas.WMS,CodeAuto = true,CodePrefix = "ZZGZ-")
public class MSSTransferRule extends BasePO implements Serializable {
    private static final long serialVersionUID = 1L;

    @DBCondition
    @DBField(CheckValue = true)
    public int BatchRuleID = 0;

    @DBCondition
    @DBJoin(name = "Code",tableName = "mss_batchrule", tableAsName = "p1",
            Schemas = DBSchemas.WMS,MainTableField ="BatchRuleID")
    public String BatchRuleCode = "";
    @DBJoin(name = "Name",tableName = "mss_batchrule", tableAsName = "p1",
            Schemas = DBSchemas.WMS,MainTableField ="BatchRuleID")
    public String BatchRuleName = "";

    @JsonProperty("BatchRuleID")
    public int getBatchRuleID() {
        return BatchRuleID;
    }

    public void setBatchRuleID(int batchRuleID) {
        BatchRuleID = batchRuleID;
    }

    @JsonProperty("BatchRuleCode")
    public String getBatchRuleCode() {
        return BatchRuleCode;
    }

    public void setBatchRuleCode(String batchRuleCode) {
        BatchRuleCode = batchRuleCode;
    }

    @JsonProperty("BatchRuleName")
    public String getBatchRuleName() {
        return BatchRuleName;
    }

    public void setBatchRuleName(String batchRuleName) {
        BatchRuleName = batchRuleName;
    }
}
